<template>
  <div class="sun">
    <h3>我是孙组件 (孙) -- {{ car }}</h3>
  </div>
</template>
  
  <script>
import { inject } from 'vue';
export default {
  name: "Sun",
  setup() {

    let car = inject('car')

    return {
        car
    }
  },
};
</script>
  
  <style>
.sun {
  background-color: gold;
  padding: 20px;
}
</style>
  